<template>
  <div id="myClinic">
    <header>
      <i @click="goBack()"></i>
      <div>我的病历</div>
    </header>
    <div class='content'>
      <label @click='select'>
        <img src="../../image/icon_appointment@2x.png" width='66' height="66" alt="">
        <input type="radio" v-model="type" value='appointment'>
        <i>预约患者</i>
      </label>
      <label @click='select1'>
        <img src="../../image/icon_patients@2x.png" width='66' height="66" alt="">
        <input type="radio" v-model="type" value='patients'>
        <i>患者病历</i>
      </label>
      <!-- <label @change='select'>
				<img src="../../image/icon_appointment@2x.png" width='66' height="66" alt="">
				<input type="radio" v-model="type" value='appointment'>
				<i>预约</i>
			</label>
			<label @change='select'>
				<img src="../../image/icon_patients@2x.png" width='66' height="66" alt="">
				<input type="radio" v-model="type" value='patients'>
				<i>患者</i>
			</label> -->
    </div>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        type: '', //类型 预约还是患者
        name: ''
      }
    },
    methods: {
      goBack() {
        this.$router.push({
          path: '/home'
        })
      },
      //预约
      select() {
        this.$router.push({
          name: 'appointmentTime',
          query: {
            // name:this.name
          }
        });
      },
      //患者
      select1() {
        localStorage.setItem('name', JSON.stringify(this.name))
        this.$router.push({
          name: 'selectpatient',
          query: {
            from: 'patients',
          }
        });
      },
    },
    created() {
      this.name = this.$route.query.user
      localStorage.setItem('name', JSON.stringify(this.name))
    }
  }

</script>
<style lang="scss" scoped>


</style>
